package com.leet.code.simple_array;

/**
 * @description:    1480.一维数组的动态和
 * @author: WYG
 * @time: 2021/1/5 9:12
 */

public class RunningSum {
    public int[] runningSum(int[] nums) {
        for (int i = 1; i < nums.length; i++) {
            nums[i] = nums[i - 1] + nums[i];
        }
        return nums;
    }
}
